import Vue from "vue";
import utils from "./utils.js";
import i18n from "@/lang"; // Internationalization
import "@/permission"; // 权限
import "@/cache"; // 页面缓冲

//  element-ui
import Element from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
//  AVUE
import AVUE from "@smallwei/avue";
import "@smallwei/avue/lib/index.css";

import AvueUeditor from "avue-plugin-ueditor";
Vue.use(AvueUeditor);

import dayjs from "dayjs";
import "@/styles/common.scss";

Vue.prototype.$s = utils;
Vue.prototype.$dayjs = dayjs;

Vue.use(Element, {
  i18n: (key, value) => i18n.t(key, value),
});
Vue.use(AVUE, {
  i18n: (key, value) => i18n.t(key, value),
  crudOption: {
    searchIndex: 3,
    // searchIcon: true,
    searchShowBtn: false,
    // searchMenuSpan: 4,
    border: true,
    index: false,
    indexLabel: "序号",
    align: "center",
    refreshBtn: false,
    columnBtn: false,
    stripe: true,
  },
});
